package com.ez.supervise.dao.impl;

import com.ez.supervise.dao.DemocracyGoalSettingDao;
import com.ez.supervise.dao.base.BaseDaoImpl;
import com.ez.supervise.model.biz.DemocracyGoalSetting;

public class DemocracyGoalSettingDaoImpl extends BaseDaoImpl implements DemocracyGoalSettingDao {
    
    public void insert(Object democracyGoalSetting) {
	sqlMapClientTemplate.insert("biz.insertDemocracyGoalSetting", democracyGoalSetting);
    }

    public Object get(Long id) {
	return (DemocracyGoalSetting) sqlMapClientTemplate.queryForObject("biz.getDemocracyGoalSettingById", id);
    }

    public void update(Object democracyGoalSetting) {
	sqlMapClientTemplate.update("biz.updateDemocracyGoalSetting", democracyGoalSetting);
    }

    public void delete(Long id) {
	sqlMapClientTemplate.delete("biz.deleteDemocracyGoalSetting", id);
    }

    /* (non-Javadoc)
     * @see com.ez.supervise.dao.DemocracyGoalSettingDao#countExisSetting(com.ez.supervise.model.biz.DemocracyGoalSetting)
     */
    public int countExisSetting(DemocracyGoalSetting setting) {
	return (Integer) sqlMapClientTemplate.queryForObject("biz.countExisSetting", setting);

    }
}
